1. Field of the Invention
The present invention generally relates to a color adjusting technology for images, and more particularly, to a method for adjusting color saturation.
2. Description of Related Art
For the purpose of making images to be displayed, e.g., television images looked more vivid, a user may adjust the images according to user's preference. Hue and saturation are two common parameters used for adjustment. When an RGB color space is converted into a YUV color space, a pixel is defined with coordinate, p(y, u, v). The pixel saturation (sat) is a vector length at a UV plane, i.e., sat=√{square root over (u2+v2)}. Therefore, adjustment to the pixel saturation is to adjust values of the original pixels, sat=√{square root over (u2+v2)}.
FIG. 1 is a schematic diagram illustrating a relationship of corresponding colors in a YUV color space. Referring to FIG. 1, color data of pixels are usually achieved in a RGB manner, and described in the YUV color space after being spatially converted. The YUV color space includes three axes, Y-axis, U-axis, and V-axis. The Y-axis is a vertical axis corresponding to brightness, while the U-axis and V-axis constitute a hue horizontal plane. When converted from an RGB space to a YUV space, an RGB color cube is also converted to a YUV color cube 100. A primary diagonal connecting a black point and white point is parallel with the Y-axis. However, the black point of the color cube is a translation from although not positioned at an origin of the YUV space. Therefore, when performing a geometry analysis, the coordinates can be simply moved to the primary diagonal, which is convenient for analysing and adjusting.
FIG. 2 is a schematic diagram illustrating a hue-saturation relationship in a YUV color space. Referring to FIG. 2, the primary diagonal of the YUV color cube 100 is constituted by connecting a black point 102 with a white point 104. For convenience of analysis, the primary diagonal can be moved to the Y-axis. A pixel 108 is described as p(y, u, v) in the color cube 100. In a normal color displaying condition, the pixel 108 is positioned inside the color cube 100. When the pixel 108 is positioned outside a boundary of the color cube 100, a color oversaturation occurs which causes unnatural color displaying.
In other words, in a horizontal plane 106 with a fixed y value, when adjusting the color saturation √{square root over (u2+v2)}, the sat=√{square root over (u2+v2)} is usually desired to be adjusted within the boundary. A region 106a having an irregular boundary is achieved by cutting the color cube 100 with the horizontal plane 106, i.e., the region at the UV plane as shown in FIG. 2. A radial coordinate rs=√{square root over (u2+v2)} of the pixel 108 is also called the saturation (sat). The direction angle θ defined by the coordinates u and v, describes the color hue.
FIG. 3 illustrates problems when adjusting the color saturation of the pixels. Referring to FIG. 3, because region 106a achieved by cutting the color cube 100 with the horizontal plane 106 irregularly varies, the boundary thereof thus varies according to variation of the height thereof, i.e., y value. Although the boundary can be obtained by geometry analysis, the geometry analysis requires for complicated computation. As such, when the pixel 108 is adjusted to a position p′(y′, u′, v′) of a pixel 110, the pixel 108 may exceed the boundary for a distance Doff, which causes color oversaturation. In other words, when adjusting colors, the boundary estimation must be considered. However, how to conveniently obtain the boundary positions is an important concern.